import pandas as pd
import numpy as np

list_data = list(range(-4, 4))
s = pd.Series(
    list_data,
    index=list("abcdefgh"))

print(s)


print(s.loc[s < 3], "\n")
print(s.loc[(s < 0) & (s > -2)], "\n")
print(s.loc[(s < 0) | (s > 2)], "\n")